package com.lianqi.emcpframework.shiro.cas.autoconfigure;

import java.util.List;

/**
 * @program emcp-framework
 * @ClassName ShiroProperties
 * @description: shiro 配置属性
 * @author: sky
 * @create: 2019/05/28 11:00
 */
public class ShiroProperties {

    protected String loginUrl = "/login.jsp";

    protected String successUrl = "/";

    protected String unauthorizedUrl;
    /**
     * 路径权限过滤
     */
    private List<PathDefinition> pathDefinitions;

    private long sessionTimeOut = 1800000;

    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    public String getSuccessUrl() {
        return successUrl;
    }

    public void setSuccessUrl(String successUrl) {
        this.successUrl = successUrl;
    }

    public String getUnauthorizedUrl() {
        return unauthorizedUrl;
    }

    public void setUnauthorizedUrl(String unauthorizedUrl) {
        this.unauthorizedUrl = unauthorizedUrl;
    }

    public long getSessionTimeOut() {
        return sessionTimeOut;
    }

    public void setSessionTimeOut(long sessionTimeOut) {
        this.sessionTimeOut = sessionTimeOut;
    }

    public void setPathDefinitions(List<PathDefinition> pathDefinitions) {
        this.pathDefinitions = pathDefinitions;
    }

    public List<PathDefinition> getPathDefinitions() {
        return pathDefinitions;
    }

    public static class PathDefinition {

        /**
         * 过滤路径
         */
        private String path;
        /**
         * 指定过滤器
         */
        private String specificFilter;

        public String getPath() {
            return path;
        }

        public String getSpecificFilter() {
            return specificFilter;
        }

        public void setPath(String path) {
            this.path = path;
        }

        public void setSpecificFilter(String specificFilter) {
            this.specificFilter = specificFilter;
        }
    }
}
